//
//  ViewController.m
//  JQNetworking
//
//  Created by zhujiaquan on 2018/1/10.
//  Copyright © 2018年 JQ. All rights reserved.
//

#import "ViewController.h"
#import "JQNetworking.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    [JQNetworkManager POST:@"http://www.baidu.com" parameters:nil configuration:^(JQNetworkConfig *config) {
        
        config.requestSerializer  = [AFHTTPRequestSerializer serializer];
        config.responseSerializer = [AFJSONResponseSerializer serializer];
        
    } success:^(NSURLSessionDataTask *task, id responseObject) {
        
        NSLog(@"responseObject = %@", responseObject);
        
    } failure:^(NSURLSessionDataTask *task, NSError *error) {
        
        NSLog(@"error = %@", error);
    }];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
